<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header">
                <span>投票活动说明设置</span>
            </h3>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <div class="row">
        <div class="col-lg-12">
            <div class="panel-group" id="accordion">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion"
                               href="#collapseOne">基本设置
                            </a>
                        </h4>
                    </div>
                    <div id="collapseOne" class="panel-collapse collapse in">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                    <form role="form" method="post" action="/User/praiseeat/desc"
                                          enctype="multipart/form-data">
                                        <input type="hidden" id='id' name="id" value="{$praise['id']}">

                                        <div class="form-group">
                                            <label>名称</label>
                                            <input type='text' class="form-control" name="title"
                                                   value="{$praise['title']}"
                                                   disabled>
                                        </div>
                                        <div class="form-group">
                                            <div>活动说明</div>
                                            <textarea id="editor-container" style="width:600px;height:300px;"></textarea>
                                        </div>
                                        <button type="submit" id='submit' class="btn btn-success">保存</button>
                                        <button type="button" class="btn btn-default" onclick="history.back(-1);">取消
                                        </button>
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" charset="utf-8" src="/Public/js/common/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/Public/js/common/ueditor.all.min.js"></script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/Public/js/common/lang/zh-cn/zh-cn.js"></script>
<script>
    var editor = UE.getEditor('editor-container');
    var content = '<?php if(empty($praise["link"])){echo "";}else{ $link = json_decode($praise["link"], true); if(empty($link["desc"])){ echo "";}else{echo $link["desc"];}}?>';
    editor.addListener("ready", function () {
        editor.setContent(content);
    });
</script>